package com.epic.java.designpattern.single;

public class SingleInstance2 {
    private static SingleInstance2 instance;

    private SingleInstance2(){};

    public static synchronized SingleInstance2 getInstance(){
        if (instance == null){
            instance = new SingleInstance2();
        }
        return instance;
    }

    public static void main(String[] args) {
        SingleInstance2.getInstance();
    }
}
